package com.xiey.study;


import io.reactivex.Observable;
import io.reactivex.functions.Consumer;

/**
 * Hello
 *
 * @author xiey
 * @created 2016/11/28
 */
public class Hello {

    public static void hello(String... names) {
        Observable.fromArray(names).subscribe(new Consumer<String>() {
            public void accept(String s) throws Exception {
                System.out.println("Hello " + s + "!");
            }
        });
    }

    public static void main(String[] args) {
        hello("Neimo", "Ben");
    }
}
